<?php

/**
 * Created by PhpStorm.
 * User: woddp
 * Date: 2016/8/13
 * Time: 11:38
 */
class StringClass
{

    //随机字符串
    function rand_string(){
       $string='qwertyuiopasdfghjklzxcvbnm1234567890';
       return substr(str_shuffle($string),0,4);//打乱字符处 截取前四位
    }
    //字符串加密
    function md5_string($str,$salt){
        return md5($str.$salt);
    }

}